<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%request.setCharacterEncoding("UTF-8"); %>
    <%@page import="java.sql.SQLException"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%String title = request.getParameter("title") ;
title=new String (title.getBytes("iso8859-1"),"utf-8"); 
out.print(title);
%>
<%			
		String sql = "delete from article where title='" + title + "'";

		Connection conn = null;
		Statement stmt = null;
		/* ResultSet rs = null; */
		
			// 加载驱动
			Class.forName("com.mysql.jdbc.Driver");
			// 获得链接
			conn = DriverManager.getConnection("jdbc:mysql://localhost/demo?useSSL=true&"
					+ "user=root&password=root" + "&useUnicode=true&characterEncoding=UTF8");
			// 获得语句对象
			stmt = conn.createStatement();
			// 执行SQL语句

			int i = stmt.executeUpdate(sql);
			
	%>
		<a href="<%=request.getContextPath()%>/SkipToArticleList">返回</a>
	
		
		<% response.sendRedirect("/blog/SkipToArticleList");%>
		

</body>
</html>